function f1(){
    var n = 999;
    nAdd = function(){
        n++;
    }
    function f2(){
        console.log(n);
        
    }
    return f2;
}

var result = f1();
result();
nAdd();
result();

console.log("----------------------");
for(var i=0;i<5;i++){
    (function(i){
        setTimeout(function(){
        console.log(i+" ");
        
        },1500);
    })(i);
}


function func(){
    var num=100;
    function a(){
        num++;
        console.log(num);
        
    }
    function b(){
        num--;
        console.log(num);
        
    }
    return [a,b];
}

var arr = func();
arr[0]();
arr[1]();

function playing(){
    var item="";
    var obj={
        play:function(){
            
        }
    }
}